﻿using Architecture.Domain.Service;
using MediatR;
using RBAC.ZhuBoLin.Application.Command.RoleCommand.Healthinfo;

namespace RBAC.ZhuBoLin.Application.CommandHandlers.RoleHandler.Healthinfo
{
    public class HealthCarCommandHandler : IRequestHandler<HealthCarCommand, int>
    {
        protected readonly IHealthCareService healthCareService;

        public HealthCarCommandHandler(IHealthCareService healthCareService)
        {
            this.healthCareService = healthCareService;
        }

        public async Task<int> Handle(HealthCarCommand request, CancellationToken cancellationToken)
        {
            return await healthCareService.HealthDel(request.id);
        }
    }
}
